<script language="JavaScript" type="text/javascript">
<!--
function checkForm() {
    formErrors = false;
    if (document.post.message.value.length < 2) {
        formErrors = "{L_EMPTY_MESSAGE}";
    }
    if (formErrors) {
        alert(formErrors);
        return false;
    } else {
        bbstyle(-1);
        return true;
    }
}
//-->
</script>

<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)" {S_FORM_ENCTYPE}>

<!-- IF S_PREVIEW_BOX -->
<table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
  <tr>
    <th height="25" class="thHead" colspan="2">{L_PREVIEW}</th>
  </tr>
  <tr>
    <td class="row2"><span class="genmed">{L_FROM}:</span></td>
    <td width="100%" class="row2"><span class="genmed">{MESSAGE_FROM}</span></td>
  </tr>
  <tr>
    <td class="row2"><span class="genmed">{L_TO}:</span></td>
    <td width="100%" class="row2"><span class="genmed">{MESSAGE_TO}</span></td>
  </tr>
  <tr>
    <td class="row2"><span class="genmed">{L_POSTED}:</span></td>
    <td width="100%" class="row2"><span class="genmed">{POST_DATE}</span></td>
  </tr>
  <tr>
    <td class="row2"><span class="genmed">{L_SUBJECT}:</span></td>
    <td width="100%" class="row2"><span class="genmed">{POST_SUBJECT}</span></td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="row1"><span class="postbody">{PREVIEW_MESSAGE}</span></td>
  </tr>
</table>
<br clear="all" />
<!-- ENDIF -->

<!-- IF ERROR_MESSAGE -->
<table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0">
    <tr>
        <td><table width="100%" cellspacing="0" cellpadding="1" border="0">
            <tr>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td align="center"><span class="error">{ERROR_MESSAGE}</span></td>
            </tr>
            <tr>
                <td>&nbsp;</td>
            </tr>
        </table></td>
    </tr>
</table>
<br clear="all" />
<!-- ENDIF -->

<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
    <tr>
        <td class="row1"><span class="gen"><b>{L_USERNAME}</b></span></td>
        <td class="row2"><span class="genmed"><input type="text"  class="post" name="username" maxlength="25" size="25" tabindex="1" value="{USERNAME}" />&nbsp;<input type="submit" name="usersubmit" value="{L_FIND_USERNAME}" class="liteoption" onClick="window.open('{U_SEARCH_USER}', '_phpbbsearch', 'HEIGHT=250,resizable=yes,WIDTH=400');return false;" /></span></td>
    </tr>
    <tr>
      <td class="row1" width="22%"><span class="gen"><b>{L_SUBJECT}</b></span></td>
      <td class="row2" width="78%"> <span class="gen">
        <input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" />
        </span> </td>
    </tr>
    <tr>
      <td class="row1" valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="1">
          <tr>
            <td><span class="gen"><b>{L_MESSAGE_BODY}</b></span> </td>
          </tr>
          <tr>
            <td valign="middle" align="center"> <br />
            <b>{L_EMOTICONS}</b>
            {SMILES_TABLE}
            </td>
          </tr>
        </table>
      </td>
      <td class="row2" valign="top"><span class="gen">
        {BBCODE_TABLE}
        <textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{MESSAGE}</textarea>
      </span></td>
    </tr>
    <tr>
      <td class="row1" valign="top"><span class="gen"><b>{L_OPTIONS}</b></span><br /><span class="gensmall">{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td>
      <td class="row2"><span class="gen"> </span>
        <table cellspacing="0" cellpadding="1" border="0">
          <!-- BEGIN switch_html_checkbox -->
          <tr>
            <td>
              <input type="checkbox" name="disable_html" {S_HTML_CHECKED} />
            </td>
            <td><span class="gen">{L_DISABLE_HTML}</span></td>
          </tr>
          <!-- END switch_html_checkbox -->
          <!-- BEGIN switch_bbcode_checkbox -->
          <tr>
            <td>
              <input type="checkbox" name="disable_bbcode" {S_BBCODE_CHECKED} />
            </td>
            <td><span class="gen">{L_DISABLE_BBCODE}</span></td>
          </tr>
          <!-- END switch_bbcode_checkbox -->
          <!-- BEGIN switch_smilies_checkbox -->
          <tr>
            <td>
              <input type="checkbox" name="disable_smilies" {S_SMILIES_CHECKED} />
            </td>
            <td><span class="gen">{L_DISABLE_SMILIES}</span></td>
          </tr>
          <!-- END switch_smilies_checkbox -->
          <!-- BEGIN switch_signature_checkbox -->
          <tr>
            <td>
              <input type="checkbox" name="attach_sig" {S_SIGNATURE_CHECKED} />
            </td>
            <td><span class="gen">{L_ATTACH_SIGNATURE}</span></td>
          </tr>
          <!-- END switch_signature_checkbox -->
        </table>
      </td>
    </tr>
    <tr>
      <td class="catbottom" colspan="2" align="center" height="28"> {S_HIDDEN_FORM_FIELDS}<input type="submit" tabindex="5" name="preview" class="mainoption" value="{L_PREVIEW}" />&nbsp;<input type="submit" accesskey="s" tabindex="6" name="post" class="mainoption" value="{L_SUBMIT}" /></td>
    </tr>
  </table>

</form>

